package com.wangwen.wechatmp.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 会员基本信息表
 */
@Getter
@Setter
@Entity
@Table(name = "user_info")
@ApiModel(description="用户对象")
@JsonInclude(value= JsonInclude.Include.ALWAYS)
public class UserInfo implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    @ApiModelProperty(value="表主键id")
    private Long id;

    /**
     * 姓名
     */
    @Column(name = "name")
    @ApiModelProperty(value="姓名")
    private String name;

    /**
     * 昵称
     */
    @Column(name = "nick_name")
    @ApiModelProperty(value="昵称")

    private String nickName;

    /**
     * 照片
     */
    @Column(name = "head_img")
    @ApiModelProperty(value="照片")
    private String headImg;

    /**
     * 手机号码
     */
    @Column(name = "phone")
    @ApiModelProperty(value="手机号码")
    private String phone;


    /**
     * 出生日期
     */
    @Column(name = "birday")
    @ApiModelProperty(value="出生日期")
    private String birday;

    /**
     * 性别
     */
    @Column(name = "gender")
    @ApiModelProperty(value="性别")
    private String gender;

    /**
     * 来源
     */
    @Column(name = "source")
    @ApiModelProperty(value="来源")
    private String source;
    /**
     * 会员卡号
     */
    @Column(name = "card_num")
    @ApiModelProperty(value="会员卡号")

    private String cardNum;

    /**
     * 会员等级
     */
    @Column(name = "level")
    @ApiModelProperty(value="会员等级")
    private Integer level;

    /**
     * 会员总积分
     */
    @Column(name = "score")
    @ApiModelProperty(value="会员总积分")
    private Integer score;

    /**
     * 剩余抽奖次数
     */
    @Column(name = "luck_draw")
    @ApiModelProperty(value="剩余抽奖次数")
    private Integer luckDraw;

    /**
     * 剩余积分
     */
    @Column(name = "remain_score")
    @ApiModelProperty(value="剩余积分")
    private Integer remainScore;
    /**
     * 会员经验
     */
    @Column(name = "express")
    @ApiModelProperty(value="会员经验")
    private Integer express;
    /**
     * 地址
     */
    @Column(name = "address")
    @ApiModelProperty(value="地址")
    private String address;

    /**
     * 状态
     */
    @Column(name = "status")
    @ApiModelProperty(value="状态")
    private String status;


    /**
     * 优惠备注
     */
    @Column(name = "reduce_remark")
    @ApiModelProperty(value="优惠备注")
    private String reduceRemark;


    /**
     * 实付金额
     */
    @Column(name = "real_pay")
    @ApiModelProperty(value="实付金额")

    private BigDecimal realPay;

    /**
     * 余额
     */
    @Column(name = "balance")
    @ApiModelProperty(value="余额")

    private BigDecimal balance;
    /**
     * 创建人
     */
    @Column(name = "create_user")
    @ApiModelProperty(value="创建人ID")
    private Long createUser;

    /**
     * 创建人姓名
     */
    @Column(name = "user_name")
    @ApiModelProperty(value="创建人姓名")
    private Integer userName;
    /**
     * 注册时间
     */
    @Column(name = "register_time")
    @ApiModelProperty(value="注册时间")
    private String registerTime;
    /**
     * 创建时间
     */
    @Column(name = "create_time")
    @ApiModelProperty(value="创建时间")
    private String createTime;

    /**
     * 修改时间
     */
    @Column(name = "modify_Time")
    @ApiModelProperty(value="修改时间")
    private String modifyTime;

    /**
     * 有效期开始时间
     */
    @Column(name = "indate_start_time")
    @ApiModelProperty(value="有效期开始时间")
    private String indateStartTime;

    /**
     * 有效期结束时间
     */
    @Column(name = "indate_end_time")
    @ApiModelProperty(value="有效期结束时间")
    private String indateEndTime;


    /**
     * 推荐人
     */
    @Column(name = "referrer")
    @ApiModelProperty(value="推荐人")
    private String referrer;

    /**
     * 备注
     */
    @ApiModelProperty(value="备注")
    @Column(name = "remark")
    private String remark;

    /**
     * 微信opne_id
     */
    @Column(name = "open_id")
    @ApiModelProperty(value="微信opne_id")
    private String openId;

    /**
     * 微信会员卡card_id   每个用户每个会员卡不一样，不同于创建卡时返回的card_id
     */
    @Column(name = "card_id")
    @ApiModelProperty(value="微信会员卡card_id")
    private String cardId;

    /**
     * 微信会员卡card_code
     */
    @Column(name = "card_code")
    @ApiModelProperty(value="微信会员卡card_id")
    private String cardCode;

    /**
     * 用户积分list
     */
    @Transient
    @ApiModelProperty(value="用户积分列表")

    List<UserIntegral> integralList;



}